<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http：//www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title></title>
    <include file="Pub:head"/>
    <link rel="stylesheet" type="text/css" href="__PUBLIC__/Css/Style.css" />

    <script type="text/javascript">
        function delagreement(id){
            if(confirm("确定要删除该订单信息吗？"))
            {
                var url= "__URL__/delagreement/id/"+id;
                window.location.assign(url);
            }
        }

        function search()
        {
            query_keywords= $("#query_keywords").val()==""?"0":$("#query_keywords").val();
            var url="__APP__/finance/agreements/query_keywords/"+query_keywords;
            window.location.assign(url);
        }

    </script>

</head>
<body>

<div class="box1">
    <fieldset style="border-color:#999999;">
        <legend>订单管理</legend>

        <div class="box2" panelTitle="功能面板" id="searchPanel">
            <table>
                <tr>
                    <td>
                        <button type="button" onclick='window.location.assign("__APP__/finance/addagreement");'>
                            <span class="icon_add">新增订单</span></button>
                    </td>
                    <td style=" width:20px;"></td>
                    <td>客户名：</td>
                    <td><input id="query_keywords" name="query_keywords" value="{$query_keywords}" type="text"/></td>
                    <td>
                        <button type="button" onclick="search()"><span class="icon_find">查询</span></button>
                    </td>
                </tr>
            </table>
        </div>

        <table class="tableStyle" >
            <tr>
                <th width="">签单日期</th>
                <th>客户名称</th>
                <th>合同号</th>
                <th>业务员</th>
                <th>金额</th>
                <th>类型</th>
                <th>备注</th>
                <th>操作</th>
            </tr>
            <volist name="agreement_list" id="vo">
                <tr>
                    <td><?php if($vo['orderdate']!='0000-00-00 00:00:00') echo date('Y-m-d',strtotime($vo['orderdate'])); ?> </td>
                    <td>{$vo['customname']}</td>
                    <td>{$vo['ordernumber']}</td>
                    <td>{$vo['cname']}</td>
                    <td>{$vo['orderamount']}</td>
                    <td>{$vo['businesstype']}</td>
                    <td><span <?php if(mb_strlen($vo['remark'],'utf8')>20){ ?> title="{$vo['remark']}<?php } ?>">
                        {$vo['remark']|msubstr=0,20,'utf-8',true}</span></td>
                    <td>
                        <a  href="__URL__/addagreement/id/{$vo['id']}"> 编辑 </a> /
                        <a  href="javascript:void(0);"  onclick="delagreement({$vo['id']});">删除</a>
                    </td>
                </tr>
            </volist>


        </table>

        <div id="TourExPage" class="page">{$page_method}</div>
    </fieldset>
</div>



</body>
</html>